package cn.alone.org.service.impl;

import cn.alone.basic.service.impl.BaseServiceImpl;
import cn.alone.org.domain.Department;
import cn.alone.org.mapper.DepartmentMapper;
import cn.alone.org.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * 部门业务实现层
 * @author lanan
 */
@Service
public class DepartmentServiceImpl extends BaseServiceImpl<Department> implements IDepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;


  /**
   * 批量删除
   * @param ids
   */
    @Override
    public void patchDelete(List<Long> ids) {
        departmentMapper.batchDeletion(ids);
    }

    //查询一二级树形部门数据
    @Override
    public List<Department> findTree() {
        return departmentMapper.findOneAndTwo();
    }


}
